-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce fill and fill! on Power manifolds. #190
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #190 +/- ##
==========================================
- Coverage 99.96% 99.90% -0.07%
==========================================
Files 30 30
Lines 3241 3257 +16
==========================================
+ Hits 3240 3254 +14
- Misses 1 3 +2 ☔ View full report in Codecov by Sentry. |
I think using
If we add methods to generic |
Oh, I was not aware of that, what is that meaning? I had fill in mind since I want to fill the power manifold point with the ball |
Ah and for repeat, I feel that might be something that sometimes fits, if one has the ArrayRepresentation in mind, but not in general maybe? So I would prefer fill I think. |
julia> fill(PowerManifold(Circle(), 3), 4)
4-element Vector{PowerManifold{ℝ, Circle{ℝ}, Tuple{Int64}, ArrayPowerRepresentation}}:
PowerManifold(Circle(ℝ), 3)
PowerManifold(Circle(ℝ), 3)
PowerManifold(Circle(ℝ), 3)
PowerManifold(Circle(ℝ), 3) 🙂
You can also thinking about it as repeating point |
Oh, indeed, hehe; I did only think of “definitions of fill within ManifoldsBase.jl”. We can also use both reapeat and fill, but I fear they actually would do the same basically then? |
I prefer |
And yes, there is no reason to have both |
My feeling is that for fill you need a size idea which the power manifold provides intuitively, |
I totally agree that here the manifold should be second. |
OK, let's use |
The two lines we lost look strange in parts I did not even change. Besides that we now have fill and fill! with the better order of parameters. |
I've added support array power representation here. I wouldn't worry about those two missed lines. I think it looks more or less fine now but I'd like to clear your question from that comment before accepting. |
…ifoldsBase.jl into kellertuer/power_fill # Conflicts: # src/PowerManifold.jl
The Nested replacing case still needs a test. |
I've added that test. I'm not sure now if nested non-replacing should perhaps make copies of |
Co-authored-by: Mateusz Baran <[email protected]>
I think it is good as is, replacing has the copy in its name so it copies, nested does not. |
Yes, it works fine indeed, though the other way (replacing doesn't make copies but non-replacing makes them). |
This introduces
fill(M,p)
to generateP = (p,...,p)
on the power manifold. as well as an in-placefill!(M, P, p)
,which I might find helpful in Manopt.jl soon.
We could discuss
fill
is documented to generate every entry with the samep